package com.xufx.algorithm.search;

/**
 * 线形查找，不多赘述
 */
public class LinearFind {
    public static void main(String[] args) {
        int[] nums = new int[]{0,-1,2,3,-1,7};
        int target = -1;
        for (int i = 0; i < nums.length; i++){
            if (target == nums[i]){
                System.out.println("this is target index" + " " + i);
            }
        }
    }
}
